import React, {Component} from 'react';
import {Icon} from "antd";
import {Switch, NavLink,Route} from 'react-router-dom'
import './styles/index.less'
import Homepage from "./components/homepage";
import ShopCar from "../shopCar/shopCar";
import User from "../user/user";
class Index extends Component {
    constructor(props) {
        super(props)
        this.state = {
            
        }
    }

    render() {
        return (
            <div className="home">
                <Switch>
                    <Route path="/index/" exact component={Homepage}/>
                    <Route path="/index/shopCart" component={ShopCar}/>
                    <Route path="/index/my" component={User}/>
                </Switch>
                <footer>
                    <dl>
                        <NavLink to="/index/">
                        <dt><Icon type="home"/></dt>
                        <dd>首页</dd></NavLink>
                    </dl>
                    <dl>
                        <NavLink to="/index/shopCart">
                            <dt><Icon type="shopping-cart"/></dt>
                            <dd>购物车</dd>
                        </NavLink>

                    </dl>
                    <dl>
                        <NavLink to="/index/my">
                            <dt><Icon type="user"/></dt>
                            <dd>我的</dd>
                        </NavLink>

                    </dl>
                </footer>
            </div>
        );
    }
}

export default Index;